package com.heo.web.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 系统常量类
 * 
 * @author my
 * 
 * @date 2015-6-16
 */
public class Constants {

	public static final String USER_NAME = "dsf";
	
	public static final String PASS_WORD = "123456";
	
	
	/**
	 * mac 前5位
	 */
	public static final String MAC_START = "0ZHDS";
	
	/**
	 * bike 前5位
	 */
	public static final String BIKE_START = "0BIKE";
	
	/**
	 * 初始化密码锁
	 */
	public static final String INIT_LOCK_PWD = "12345678";
	
	/**
	 * 初始化密码锁
	 */
	public static final String UPDATE_LOCK_PWD = "zhdsManBike105";
	
//	public static final String MAC_START = "00AE69";
	
	/**
	 * 支付类型 1 为支付宝支付
	 */
	public static final int PAY_TYPE_ALI = 1;

	/**
	 * 支付类型 2为 微信支付
	 */
	public static final int PAY_TYPE_WEIXIN = 2;
	
	/**
	 * 支付类型 7为 微信公众号支付
	 */
	public static final int PAY_TYPE_WEIXIN_GZH = 7;

	/**
	 * 1为支付
	 */
	public static final int PAY_OPTION = 1;

	/**
	 * 2 为充值
	 */
	public static final int PAY_RECHARGE = 2;
	
	public static final int BIKE_PAY_RECHARGE = 8;
	public static final int BIKE_PAY_RECHARGE_PACK_YEARS = 7;
	public static final int BIKE_PAY_RECHARGE_PAY = 9;
	public static final int ZHI_YIN_SHUI_PAY_RECHARGE_PAY = 10;
	public static final int CHUI_FENG_JI_RECHARGE_PAY = 11;  //支付
	public static final int CHONG_DIAN_ZHUANG_RECHARGE_PAY = 12;  //支付
	public static final int YAO_YAO_JI_RECHARGE_PAY = 13;  //支付
	public static final int AN_MO_YI_RECHARGE_PAY = 14;  //支付
	public static final int RE_SHUI_RECHARGE_PAY = 15;  //支付

	/**
	 * 支付宝商家 签约合作者身份ID
	 */
	public static final String PAY_PARTNER = "2088021770164516";
	
	public static final String PAY_APPID = "2015091800296523";

	/**
	 * 支付宝回调路径
	 */
	public final static String PAY_NOTIFY_URL = "http://www.iwmore.com/ewash/pay/payController/aliPay";
	/**
	 * 支付宝 商户收款账号
	 */
	public static final String PAY_SELLER = "ewashmanager@163.com";

	/**
	 * zhds支付宝商家 签约合作者身份ID
	 */
	public static final String PAY_PARTNER_ZHDS = "2088021009659211";
	
	public static final String PAY_APPID_ZHDS = "2015082500231151";
	/**
	 * zhds 支付宝 商户收款账号
	 */
	public static final String PAY_SELLER_ZHDS = "laneta.certified@laneta.cn";
	
	/**
	 * zhds 支付宝回调路径
	 */
	public final static String PAY_NOTIFY_URL_ZHDS = "http://www.iwmore.com/ewash/pay/payController/aliPayZhds";
	
	/**
	 * zhds 支付宝回调路径   预约
	 */
	public final static String PAY_NOTIFY_URL_ZHDS_APPOINTMENT = "http://www.iwmore.com/ewash/pay/payController/aliPayZhdsAppointment";
	
	/**
	 * zhds 支付宝回调路径
	 */
	public final static String PAY_NOTIFY_URL_ZHDS_BIKE = "http://www.iwmore.com/ewash/pay/payController/aliPayZhdsBike";
	
	
	/**
	 * zhds 支付宝回调路径
	 */
	public final static String PAY_NOTIFY_URL_ZHDS_YAJIN = "http://www.iwmore.com/ewash/pay/payController/aliPayZhdsYaJin";

	/**
	 * zhds 支付宝回调路径
	 */
	public final static String PAY_NOTIFY_URL_ZHDS_GUANGGAO = "http://www.iwmore.com/ewash/pay/payController/aliPayZhdsGuangGao";
	/**
	 * appid
	 */
	public static final String WX_APP_ID = "wx10e9bf42fca08960";

	/**
	 * 商户号
	 */
	public static final String WX_MCH_ID = "1271896801";
	
	/**
	 * API密钥，在商户平台设置
	 */
	public static final String WX_API_KEY = "raccoonRaccoon20150916Washwash88";
	
	/**
	 * 微信回调路径
	 */
	public final static String WX_NOTIFY_URL = "http://www.iwmore.com/ewash/pay/payController/wxPay";
	
	/**
	 * zhds appid
	 */
	public static final String WX_APP_ID_ZHDS = "wx2395182a57c015d4";

	/**
	 * zhds 商户号
	 */
	public static final String WX_MCH_ID_ZHDS = "1344603701";

	/**
	 * zhds API密钥，在商户平台设置
	 */
	public static final String WX_API_KEY_ZHDS = "lanetaZHDS20160602likeSghEgoKsr8";
	
	/**
	 * zhds 微信回调路径
	 */
	public final static String WX_NOTIFY_URL_ZHDS = "http://www.iwmore.com/ewash/pay/payController/wxPayZhds";
	
	/**
	 * zhds 微信回调路径
	 */
	public final static String WX_NOTIFY_URL_ZHDS_YAJIN = "http://www.iwmore.com/ewash/pay/payController/wxPayZhdsYaJin";

	
	/**
	 * zhds 微信回调路径
	 */
	public final static String WX_NOTIFY_URL_ZHDS_GUANGGAO = "http://www.iwmore.com/ewash/pay/payController/wxPayZhdsGuangGao";
	
	/**
	 * zhds 微信回调路径
	 */
	public final static String WX_NOTIFY_URL_ZHDS_BIKE = "http://www.iwmore.com/ewash/pay/payController/wxPayZhdsBike";
	
	/**
	 * zhds 微信回调路径   预约
	 */
	public final static String WX_NOTIFY_URL_ZHDS_APPOINTMENT = "http://www.iwmore.com/ewash/pay/payController/wxPayZhdsAppointment";

	/**
	 * 微信公众号appid
	 */
	public final static String WEIXIN_GZH_APP_ID = "wx7dee00a93cca84e1";
	
	/**
	 * 微信公众号appSecret
	 */
	public final static String WEIXIN_GZH_APP_SECRET = "65150a2d37ccc085e49f208399a2d98f";
	
	/**
	 * 微信公众号商户id
	 */
	public final static String WEIXIN_GZH_MCH_ID = "1250564201";
	
	/**
	 * 微信公众号API密钥，在商户平台设置
	 */
	public final static String WEIXIN_GZH_API_KEY = "zhdsZhdsmeiyu20160413M32fhnn09dd";
	/**
	 * 微信授权url
	 */
	public final static String WEIXIN_OAUTH_URL = "https://api.weixin.qq.com/sns/oauth2/access_token";
	
	public final static String WEIXIN_REFRESH_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/refresh_token";
	
	public final static String WEIXIN_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo";
	
	public final static String XIAOZHANG_URL = "http://sub-manager.8zao.net/devicethird/";
	/**
	 * appid 小程序
	 */
	public static final String XCX_APP_ID = "wxbf548e79a35f4fb8";

	/**
	 * 商户号 小程序
	 */
	public static final String XCX_MCH_ID = "1250564201";
	/**
	 * appSecret 小程序
	 */
	public final static String XCX_APP_SECRET = "e2e3886d84e341814d68b69090102285";
	/**
	 * API密钥，在商户平台设置  小程序
	 */
	public static final String XCX_API_KEY = "zhdsZhdsmeiyu20160413M32fhnn09dd";
	/**
	 * 交易提醒模板ID  小程序
	 * 提醒内容：商品详情，支付金额，交易类型，订单编号，买家备注
	 */
	public static final String XCX_JY_KEY ="6u36rWi--BCE8k7xL3SewsbkGz3GyzgRM4gbMmyJPYg";
	/**
	 * 小程序 微信回调路径
	 */
	public final static String WX_XCX_URL = "http://iwmore.com/ewash/pay/payController/xcxPay";
	
	/**
	 * 支付宝 服务接口名称， 固定值
	 */
	public static final String PAY_SERVICE = "mobile.securitypay.pay";
	/**
	 * 支付宝 支付类型， 固定值
	 */
	public static final String PAY_PAYMENT_TYPE = "1";
	/**
	 * 支付宝 参数编码， 固定值
	 */
	public static final String PAY_INPUT_CHARSET = "utf-8";
	/**
	 * 支付宝 设置未付款交易的超时时间
	 */
	public static final String PAY_IT_B_PAY = "30M";
	/**
	 * 支付宝 支付宝处理完请求后，当前页面跳转到商户指定页面的路径，可空
	 */
	public static final String PAY_RETURN_URL = "m.alipay.com";

	/**
	 * 系统设置(S模块)名称数据表简写
	 */
	public static final String MN_S = "S_";
	/**
	 * 设备管理(W模块)名称数据表简写
	 */
	public static final String MN_W = "W_";
	/**
	 * 充值管理(R模块)名称数据表简写
	 */
	public static final String MN_R = "R_";
	/**
	 * 登陆页面
	 */
	public static final String LOGIN_URL = "/s1platform/login.jsp";
	
	/**
	 * 登陆页面
	 */
	public static final String LOGIN = "/ewash/login.jsp";

	/**
	 * 登陆用户的session
	 */
	public static final String LOGIN_ACCOUNTMAP_SESSION = "loginAccountMapSeesion";

	/**
	 * 操作成功
	 */
	public static final String OPERATIONS_SUCCESS = "success";

	/**
	 * 操作失败
	 */
	public static final String OPERATIONS_ERROR = "error";

	/**
	 * 上传文件夹 主目录
	 */
	public static final String SAVE_FOLDER = "upload";

	/**
	 * 上传保存图片文件夹名
	 */
	public static final String SECOND_SAVE_FOLDER = "icon";

	/**
	 * 上传保存图片临时文件夹名
	 */
	public static final String TEMP_SECOND_SAVE_FOLDER = "temp";

	/**
	 * 文件上传根目录
	 */

	public static final String UPLOAD_ROOT_DIRECTORY = "/ewashFiles";
	
	//上传保存图片文件夹名
	public static final String UPLOAD_PIC_FEEDBACK = "/feedback/";
	public static final String UPLOAD_PIC_USER = "/user/";

	/**
	 * 验证码
	 */
	public static final String VERIFY_CODE = "verifyCode";
	/**
	 * 1、普通账户 2、维修人员账户 3、系统管理员 4、商家机主,5、代理商家
	 */
	public static final int ORDINARY_ACCOUNT = 1;
	public static final int MAINTAIN_ACCOUNT = 2;
	public static final int ADMIN_ACCOUNT = 3;
	public static final int MERCHANT_ACCOUNT = 4;
	public static final int PROXY_MERCHANT_ACCOUNT = 5;
	public static final int CARD_BIND_CODE = 3;
	/**
	 * 状态码
	 * 
	 * 1：有效/是；0：无效/否
	 */
	public static final int VALID_CODE = 1;

	public static final int INVALID_CODE = 0;
	
	// 短息类型  1注册  2忘记密码  3 故障
	public static final int SMS_REG = 1;
	public static final int SMS_FORGET = 2;
	public static final int SMS_GUZHANG = 3;

	/**
	 * 
	 * 1：注册码；2：短信邀请链接
	 */
	public static final int REGISTER_CODE = 1;

	public static final int SMS_INVITATION_LINK = 2;

	/**
	 * 分页 显示数量
	 */
	public static final int PAGESIZE = 10;

	/**
	 * 登陆操作提示类别 LOGIN_VERFIY_CODE_ERROR 验证码错误
	 */
	public static final String LOGIN_VERFIY_CODE_ERROR = "loginVerfiyCodeError";
	
	
	
	public static final String LOGIN_SMS_CODE_ERROR = "loginSMSCodeError";
	
	
	public static final String LOGIN_SMS_CODE_TIMEOUT = "loginSMSCodeTimeOut";

	/**
	 * 登陆操作提示类别 LOGIN_ACCOUNT_OR_PWD_ERROR 账号或密码错误
	 */
	public static final String LOGIN_ACCOUNT_OR_PWD_ERROR = "loginAccountOrPwdError";
	
	/**
	 * 登陆操作提示类别 LOGIN_ACCOUNT_OR_PWD_ERROR 账号或密码错误
	 */
	public static final String LOGIN_ACCOUNT_OR_SYSTEM_ERROR = "systemError";

	/**
	 * 登陆操作提示类别 LOGIN_ACCOUNT_OR_PWD_ERROR 账号或密码错误
	 */
	public static final String LOGIN_ACCOUNT_OR_TYPE = "loginAccountOrType";
	/**
	 * 登陆操作提示类别 LOGIN_SUCCESS 登录成功
	 */
	public static final String LOGIN_SUCCESS = "loginSuccess";

	/**
	 * 0 空闲 1 开始设备 2 开始脱水 3 工作中
	 */
	public static final int WASH_FAULT = 0;
	public static final int WHASHING_START = 1;
	public static final int DRYING_START = 2;
	public static final int WORKING = 3;

	/**
	 * 1、管理员菜单
	 */
	public static final int ADMIN_MENU = 1;
	/**
	 * 2、机主菜单
	 */
	public static final int MERCHANT_MENU = 2;
	/**
	 * 3、合用菜单
	 */
	public static final int TOGETHER_MENU = 3;
	
	/**
	 * 4、代理菜单
	 */
	public static final int PROXY_MERCHANT_MENU = 4;
	
	/**
	 * 5、自行车菜单
	 */
	public static final int BIKE_MERCHANT_MENU = 5;

	/**
	 * 设备命令-1 重启 设备状态 0、空闲中 1、 工作中 2、故障中
	 */
	public static final int WASHER_FAULT = 2;
	public static final int WASHER_FEED = 0;
	public static final int WASHER_WASHING = 1;

	/**
	 * 设备状态 0：未完成（工作中出现故障）
	 */
	public static final int WASH_CMD_RE = -1;
	/**
	 * 设备命令 0、空闲
	 */
	public static final int WASH_CMD_ZORE = 0;
	/**
	 * 工作命令 1、开始工作
	 */
	public static final int WASH_CMD_ONE = 1;
	/**
	 * 工作命令 2、开始脱水
	 */
	public static final int WASH_CMD_TWO = 2;

	/**
	 * 设备状态 -1、重启
	 */
	public static final int WASH_STATUS_RE = -1;
	/**
	 * 设备状态 0、空闲
	 */
	public static final int WASH_STATUS_ZORE = 0;
	/**
	 * 设备状态 1、准备中
	 */
	public static final int WASH_STATUS_ONE = 1;
	/**
	 * 设备状态 3、工作中
	 */
	public static final int WASH_STATUS_THREE = 3;
	
	/**
	 * 设备状态 4、故障中
	 */
	public static final int WASH_STATUS_FOUR = 4;
	
	//启动故障
	public static final int QIDONG_ERROR = 99999999;
	//超时故障
	public static final int CHAOSHI_ERROR = 99999998;
	//超时故障
	public static final int REQUEST_ERROR = 99999997;
	//洗衣机主板故障
	public static final int BOARD_ERROR = 99999996;

	/**
	 * 设备状态 0、空闲
	 */
	public static final int WASHDEVICE_STATUS_ZORE = 0;
	/**
	 * 设备状态 1、工作中
	 */
	public static final int WASHDEVICE_STATUS_ONE = 1;
	/**
	 * 设备状态 2、故障中
	 */
	public static final int WASHDEVICE_STATUS_TWO = 2;
	/**
	 * 设备状态3、投幣中
	 */
	public static final int WASH_DEVICE_THIRD = 3;

	/**
	 * 
	 * 设备状态 0、低电频 工作中
	 */
	public static final int WASH_DEVICE_ZORE = 0;
	/**
	 * 设备状态 1、高电频 空闲
	 */
	public static final int WASH_DEVICE_ONE = 1;
	
	/**
	 * 设备状态2、故障
	 */
	public static final int WASH_DEVICE_TWO = 2;

	// 创建一个可重用固定线程数的线程池
//	public static ExecutorService smsPool = Executors.newSingleThreadExecutor();

	/**
	 * 开启两个线程
	 */
	public static ExecutorService pool = Executors.newFixedThreadPool(10);
	
	/**
	 * 开启水机消息发送
	 */
	public static ExecutorService waterPool = Executors.newFixedThreadPool(5);
	
	/**
	 * 开启订阅消息线程
	 */
	public static ExecutorService executorService = Executors.newFixedThreadPool(3);
	
	
	/**
	 * 开启订阅消息线程
	 */
	public static ExecutorService executorOctopusService = Executors.newFixedThreadPool(4);

	public static final String AES_SKEY = "ewash";
	
	public static final String AES_ADV_SKEY = "advertisement";
	
	
	
	/**
	 * 操作状态，0、取消，1、提交中，2、打回，3，确认，4、打款（完成）
	 */
	
	public static final int WITHDRAW_CANCEL = 0;
	public static final int WITHDRAW_SUBMIT = 1;
	public static final int WITHDRAW_REVOKE = 2;
	public static final int WITHDRAW_ENSURE = 3;
	public static final int WITHDRAW_COMPLETE = 4;
	
	//管理员
	public static final int WITHDRAW_ADMIN = 3;
	
	//退款是否成功  2、忽略   1、退款 0、未退款  
	public static final int MAINTITAINER_NO = 0;
	public static final int MAINTITAINER_YES = 1;
	public static final int MAINTITAINER_IGNORED = 2;
	
	//是否完成,0未完成，1完成
	public static final int WASH_FINISH_NO = 0;
	public static final int WASH_FINISH_YES = 1;
	
	//扣费是否成功  1、扣款 0、未扣款
	public static final int IS_PAY_YES = 1;
	
	// 客户端版本类型   1浣熊用户版本  2浣熊维护版本
	public static final int CLIENT_TYPE_CODE1 = 1;
	public static final int CLIENT_TYPE_CODE2 = 2;
	
	//用户版本
	public static final String APK_NAME="ewash";
	//维护版本
	public static final String APK_NAME_WH ="ewash_wh";
	
	//存放文件名
	public static final String HUAN_XIONG ="huanxiong";
	
	//短信邀请下载URL
	public static final String SMS_URL ="http://iwmore.com/ewash.apk";
	
	//故障类型，1、工作故障,不需要退款，2启动故障，3工作故障，需要退款
	public static final int FAULTY_TYPE_ONE = 1;
	public static final int FAULTY_TYPE_TWO = 2;
	public static final int FAULTY_TYPE_THREE = 3;
	
	public static final String ADMIN_ACCOUNT_LOGIN="13333333333";
	public static final String EXCEL_FILE_SXTENSION_NAME=".xls";
	
	public static final String HTTP_URL="http://192.168.1.38:8080/ewash/servlet/WriteFileServlet";
	
	public static final String XI_YI_JI = "XI_YI_JI";
	public static final String KAI_SHUI = "KAI_SHUI";
	public static final String ZI_XING_CHE = "ZI_XING_CHE";
	public static final String CHONG_DIAN_ZHUANG = "CHONG_DIAN_ZHUANG";
	public static final String CHUI_FENG_JI = "CHUI_FENG_JI";
	public static final String ZHI_YIN_SHUI = "ZHI_YIN_SHUI";
	public static final String AN_MO_YI = "AN_MO_YI";
	public static final String YAO_YAO_JI = "YAO_YAO_JI";
	public static final String RE_SHUI = "RE_SHUI";
	 
	public static final String FREE_STATUS = "FREE_STATUS";   //空闲状态指令
	public static final String SLOT_MATCH = "SLOT_MATCH";     //投币返回匹配指令
	public static final String SLOT_STATUS = "SLOT_STATUS";    //投币状态指令
	public static final String QUERY = "QUERY";         //状态查询指令
	public static final String START = "START";     //开始指令
	public static final String WORK_STATUS = "WORK_STATUS";    //工作状态指令
	public static final String START_MATCH = "START_MATCH";   //开始返回匹配指令
	public static final String SLOT = "SLOT";   //投币指令
}